import request from '@/utils/request'

// 启动入住申请流程
export function startAdmissionProcess(data) {
  return request({
    url: '/admission/process/start',
    method: 'post',
    data: data
  })
}

// 完成评估步骤
export function completeAssessment(data) {
  return request({
    url: '/admission/process/complete-assessment',
    method: 'post',
    data: data
  })
}

// 完成审批步骤
export function completeApproval(data) {
  return request({
    url: '/admission/process/complete-approval',
    method: 'post',
    data: data
  })
}

// 获取用户待办任务
export function getPendingTasks() {
  return request({
    url: '/admission/process/pending-tasks',
    method: 'get'
  })
}

// 获取任务跳转信息
export function getTaskRedirectInfo(taskId) {
  return request({
    url: `/admission/process/redirect/${taskId}`,
    method: 'get'
  })
}

// 完成入住配置步骤
export function completeConfiguration(data) {
  return request({
    url: '/admission/process/complete-configuration',
    method: 'post',
    data: data
  })
}

// 完成签约办理步骤
export function completeContract(data) {
  return request({
    url: '/admission/process/complete-contract',
    method: 'post',
    data: data
  })
}